package no.hig.imt4721.model;

import java.util.ArrayList;
import java.util.List;

public class Subject
{
	private List<Session> sessions = new ArrayList<Session>();
	private String name;

	public void addSession(Session session)
	{
		sessions.add(session);
	}

	public void setSessions(List<Session> sessions)
	{
		this.sessions = sessions;
	}

	public List<Session> getSessions()
	{
		return sessions;
	}
	
	public String getName()
	{
		return name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	// Inputs (per Person) = Sessions(8) * Repetitions(50) (=400)
	public int getInputs()
	{
		int inputs = 0;
		
		for (Session session: this.sessions)
		{
			inputs = inputs + session.getRepetitions().size();
		}

		return inputs;
	}
}
